<template>
  <div>
    <el-button @click="pageName='UserInfo'">个人详情</el-button>
    <el-button @click="pageName='JobInfo'">岗位信息</el-button>

    <component :is="pageName"/>
    <!-- <UserInfo v-if="pageName === 'UserInfo'" />
    <JobInfo v-if="pageName === 'JobInfo'" /> -->
  </div>
</template>

<script>
import JobInfo from '../employees/components/job-info.vue'
import UserInfo from '../employees/components/user-info.vue'
export default {
  components: {
    UserInfo,
    JobInfo
  },
  data() {
    return {
      pageName: 'UserInfo'
    }
  }
}
</script>

<style>

</style>
